@layout("/common/_container.html",{plugins:["ztree"],js:["/assets/modular/system/projectwsjd/projectwsjd_waimai.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">通知管理</span>
</div>
<style>
    td[data-edit=text] {
        background: #fff9f9;
    }

    .cadr {
        margin-right: 15px;
    }

    .cadr1 {
        width: 33%;
        display: inline-block;
    }

    /*使列表框与表格单元格重合*/
    td .layui-form-select {
        /*margin-top: -10px;*/
        margin-left: -15px;
        margin-right: -15px;
    }

    .layui-table-cell:first-child {
        height: auto;
    }

    .laytable-cell-1-0-15 {
        width: 150px !important;
    }

    .laytable-cell-1-0-16 {
        width: 150px !important;
    }

    .layui-table img {
        max-width: 24px !important;
        max-height: 24px!important;
    }

    .layui-table td, .layui-table th, .layui-table-grid-down, .layui-table-view {
        border-color: #e2e2e2;
    }
    /*.layui-table-box {*/
    /*    overflow: auto!important;*/
    /*}*/
    /*.layui-table-header, .layui-table-body{*/
    /*    overflow: visible!important;*/
    /*}*/
    .layui-table-fixed tr:nth-child(1) th:nth-child(4), .layui-table-fixed tr:nth-child(1) th:nth-child(3){
        display: none!important;
    }
    .layui-table-fixed tr:nth-child(2) th {
        height: 67px;
    }
    .layui-table-fixed .jb{
        display: none;!important;
    }
    .layui-table-fixed .th{
        height: 30px!important;
    }
    .layui-layer-page{
        z-index: 19891016;
        width: 800px;
        top: 194.054px;
        left: 180.5px;
        height: 80% !important;
    }
    .rebut{
        position: fixed;
        right: 50px;
        top: 50px;
        z-index: 9999;
    }
    .rebut_name{
        font-size: 14px;
        color: white;
        margin-bottom: 20px;
    }
    .laytable-cell-1-0-4{
        padding: 0!important;
    }
    .laytable-cell-1-0-5{
        padding: 0!important;
    }
    .laytable-cell-1-0-7{
        padding: 0!important;
    }
    .laytable-cell-1-0-8{
        padding: 0!important;
    }
    .laytable-cell-1-0-9{
        width: 80px!important;
        padding: 0!important;
    }
    .laytable-cell-1-0-10{
        padding: 0!important;
    }
    .laytable-cell-1-0-11{
        padding: 0!important;
        width: 60px!important;
    }
    .laytable-cell-1-0-12 {
        width: 60px!important;
        padding: 0!important;
    }
    .laytable-cell-1-0-13 {
        width: 60px!important;
        padding: 0!important;
    }
    .laytable-cell-1-0-14 {
        width: 70px!important;
        padding: 0!important;
    }
    .laytable-cell-1-0-17 {
        width: 70px!important;
        padding: 0!important;
    }
    .laytable-cell-1-0-18 {
        width: 65px!important;
        padding: 0!important;
    }
    .laytable-cell-1-0-19 {
        width: 70px!important;
        padding: 0!important;
    }
    .laytable-cell-1-0-20 {
        width: 105px!important;
        padding: 0!important;
    }
    .laytable-cell-1-0-21 {
        width: 70px!important;
        padding: 0!important;
    }
    .layui-table-cell {
         padding: 0 5px!important;
     }
    .laytable-cell-1-0-22 {
        width: 120px!important;
        min-height: 56px;
        padding: 15px 0 0!important;
    }



    ::-webkit-scrollbar {
        height: 16px!important;
        width: 16px!important;
    }
</style>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <input id="yaoma" class="layui-input" type="text" placeholder="妖码"/>
                                <input id="ad" hidden value="${a}"/>
                            </div>
                            <div class="layui-inline">
                                <input id="mingcheng" class="layui-input" type="text" placeholder="门店名称"/>
                            </div>
                            <div class="layui-inline">
                                <select name="startWorkYn" lay-filter="startWorkYn" id="shStatus"
                                        lay-search="startWorkYn">
                                    <option value="1">待审核</option>
                                    <option value="3">通过</option>
                                    <option value="2">驳回</option>
                                    <option value="">全部</option>
                                </select>
                            </div>
                            <div class="layui-inline">
                                <button id="btnSearch" class="layui-btn icon-btn">搜索</button>
                                <button id="reset" class="layui-btn icon-btn">清空</button>
                                <button id="btnImportM" class="layui-btn icon-btn">导出美团数据</button>
                                <button id="btnImportE" class="layui-btn icon-btn">导出饿了么数据</button>
                                @if(shiro.hasPermission("/btyWsjd/edit")){
                                <button id="btnDoneM" class="layui-btn icon-btn">完成美团</button>
                                <button id="btnDoneE" class="layui-btn icon-btn">完成饿了么</button>
                                <button id="btnDown" class="layui-btn icon-btn">图片批量下载</button>
                                <button id="btnPass" class="layui-btn icon-btn">批量通过</button>
                                @}
                                <!--<a id="ways" href="http://192.168.188.178:88/cloudFile/wmtp.zip"></a>-->
                                <!--<a id="ways" href="http://localhost/cloudFile/wmtp.zip"></a>-->
                            </div>
                        </div>
                    </div>
                    <table class="layui-table" id="noticeTable" lay-filter="noticeTable"></table>
                </div>

            </div>
        </div>
    </div>
</div>

<script type="text/html" id="tableBar">
    @if(shiro.hasPermission("/btyWsjd/edit")){
    {{#  if(d.shStatus == '1'){ }}
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="pass">通过</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="rebut">驳回</a>
    {{# } }}
    @}
</script>
<script>
    (function(){
        var util = {
            css: function(elem,obj){
                for(var i in obj){
                    elem.style[i] = obj[i];
                }
            },
            addEvent: (function(window, undefined) {
                var _eventCompat = function(event) {
                    var type = event.type;
                    if (type == 'DOMMouseScroll' || type == 'mousewheel') {
                        event.delta = (event.wheelDelta) ? event.wheelDelta / 120 : -(event.detail || 0) / 3;
                    }
                    //alert(event.delta);
                    if (event.srcElement && !event.target) {
                        event.target = event.srcElement;
                    }
                    if (!event.preventDefault && event.returnValue !== undefined) {
                        event.preventDefault = function() {
                            event.returnValue = false;
                        };
                    }

                    return event;
                };
                if (window.addEventListener) {
                    return function(el, type, fn, capture) {
                        if (type === "mousewheel" && document.mozFullScreen !== undefined) {
                            type = "DOMMouseScroll";
                        }
                        el.addEventListener(type, function(event) {
                            fn.call(this, _eventCompat(event));
                        }, capture || false);
                    };
                } else if (window.attachEvent) {
                    return function(el, type, fn, capture) {
                        el.attachEvent("on" + type, function(event) {
                            event = event || window.event;
                            fn.call(el, _eventCompat(event));
                        });
                    };
                }
                return function() {};
            })(window)
        };


        function Preview(opt){
            var _this = this;
            if(!opt.imgWrap || opt.imgWrap==""){
                alert("璇峰～鍐欏浘鐗囧鍣╥d");
                return;
            }

            this.Opt = {
                imgWrap: '',
                beforeCreat: function(){},
                afterCreat: function(){}
            };

            // 鍚屾鍙傛暟
            for(var i in this.Opt){
                if(opt[i]) this.Opt[i] = opt[i];
            }

            this.elemPreviewContain = document.getElementsByTagName("body")[0]; // 棰勮瀹瑰櫒 棰勮榛樿灞曠ず鍦╞ody鍐呬竴灞�
            this.elemContain = document.getElementById(this.Opt.imgWrap); // 琚瑙堝浘鐗囧闈㈢殑瀹瑰櫒
            this.elemPreviewImg = null; // 棰勮鐨勫浘鐗囩殑杞戒綋
            this.elemPreviewClose = null; // 鍏抽棴棰勮鎸夐挳
            this.elemPreviewCloseBj = null; // 鍏抽棴棰勮鑳屾櫙
            this.imgBg = null; // 棰勮鏈€鍚庨潰鐨勯粦鑹茶儗鏅�
            this.moveObj = null // 瀹為檯琚嫋鍔ㄧ殑鍏冪礌

            this.init();

            // 棰勮鍥剧墖
            this.LEFT = this.elemPreviewContain.offsetWidth/2; // 璁板綍鍒氬紑濮嬬綉椤垫樉绀鸿窛绂诲乏杈圭殑浣嶇疆
            this.TOP = this.elemPreviewContain.offsetHeight/2; // 璁板綍鍒氬紑濮嬬綉椤垫樉绀鸿窛绂讳笂杈圭殑浣嶇疆
            this.onOff = true; // 鏄惁鏄偣鍑讳簨浠剁殑寮€鍏�
            this.startX = 0; // 瀛樺偍鎸変笅榧犳爣鏃剁浉瀵规祻瑙堝櫒鐨勪綅缃甔
            this.startY = 0; // 瀛樺偍鎸変笅榧犳爣鏃剁浉瀵规祻瑙堝櫒鐨勪綅缃甕
            this.moveX = 0;  // 绉诲姩鐨勬椂鍊欏厓绱犵殑left鍊�
            this.moveY = 0;  // 绉诲姩鐨勬椂鍊欏厓绱犵殑top鍊�
            this._WIDTH = 0; // 棰勮鍥剧墖鍘熷杞戒綋瀹藉害
            this._HEIGHT = 0; // 棰勮鍥剧墖鍘熷杞戒綋楂樺害
            this.WIDTH = 0; // 棰勮鍥剧墖杞戒綋瀹藉害
            this.HEIGHT = 0; // 棰勮鍥剧墖杞戒綋楂樺害
        }

        Preview.VERSION = '1.0.0';
        var randomNum = new Date().getTime();
        Preview.initParams = {
            bgClass: "img_bgmask"
        };
        Preview.prototype = {
            constructor: Preview,
            init: function(){
                var _this = this;

                this.imgBg = document.createElement("div");
                this.imgBg.className = 'img_bgmask';
                util.css(this.imgBg,{position:"fixed",left:0,top:0,width:'100%',height:"100%",fontSize:0,background:'rgba(0,0,0,.6)',display:"none"});
                this.imgBg.innerHTML = '<div class="popurNode" style="position: absolute;left:0;top:0;width:100%;height:100%;z-index:1"></div><span style="position: absolute;top: 50px;right:50px;z-index: 10;height: 48px;width: 48px;background:red;cursor:pointer;border-radius:50%;" class="close_bgmask"></span><div style="position:absolute;left:50%;top:50%;" class="view_img_wrap"><img style="width:100%;height:100%;position: relative;z-index: -1;" src="" alt=""></div>';
                this.elemPreviewContain.appendChild(this.imgBg);
                this.elemPreviewImg = this.imgBg.getElementsByTagName("img")[0];
                this.moveObj = this.elemPreviewImg.parentNode; // 琚Щ鍔ㄧ殑鍏冪礌锛岃繖閲屾槸鍥剧墖杞戒綋鐨勫鍣╠iv
                this.elemPreviewClose = this.imgBg.getElementsByTagName("span")[0];
                this.elemPreviewCloseBj = this.imgBg.querySelector(".popurNode");
                this.elemContain.addEventListener("click",preview,false);

                function preview(e){
                    e = e || window.event;
                    e.stopPropagation();

                    var target = e.target;
                    var tag = target.tagName.toLowerCase();

                    if(tag!=='img') return;
                    _this.elemPreviewImg.src = target.src;
                    util.css(_this.imgBg,{display:"block"});

                    _this._WIDTH = _this.WIDTH = _this.elemPreviewImg.offsetWidth;
                    _this._HEIGHT = _this.HEIGHT = _this.elemPreviewImg.offsetHeight;

                    util.css(_this.moveObj,{
                        width:_this.WIDTH+"px",
                        marginLeft:-_this.WIDTH/2+"px",
                        marginTop:-_this.HEIGHT/2+"px",
                        left:'50%',
                        top:'50%'
                    })
                }

                this.moveObj.addEventListener("mousedown",mousedown,false);
                function mousedown(e){
                    e = e || window.event;
                    e.stopPropagation();

                    _this.onOff = true;
                    _this.startX = e.pageX;
                    _this.startY = e.pageY;

                    document.addEventListener("mousemove",mousemove,false);
                    function mousemove(ev){
                        _this.onOff=false;
                        _this.moveX = ev.pageX-_this.startX+_this.LEFT;
                        _this.moveY = ev.pageY-_this.startY+_this.TOP;

                        util.css(_this.moveObj,{
                            "left":_this.moveX+"px",
                            "top":_this.moveY+"px"
                        });

                        ev.preventDefault();
                    }

                    document.addEventListener("mouseup",mouseup,false);
                    function mouseup(ev){
                        document.removeEventListener("mousemove",mousemove,false);
                        document.removeEventListener("mouseup",mouseup,false);
                        if(_this.onOff) return false;
                        _this.LEFT = _this.moveX;
                        _this.TOP = _this.moveY;
                    }
                    e.preventDefault();
                }

                this.elemPreviewClose.onclick = function(){
                    _this.previewClose();
                };
                this.elemPreviewCloseBj.onclick = function(){
                    _this.previewClose();
                };
                util.addEvent(this.imgBg, "mousewheel", function(event) {
                    this.WIDTH = _this.elemPreviewImg.offsetWidth;

                    if (event.delta > 0) {
                        util.css(_this.moveObj,{width:(this.WIDTH+20)+"px"});
                    }else {
                        util.css(_this.moveObj,{width:(this.WIDTH-20)+"px"});
                    }

                    this.HEIGHT = _this.elemPreviewImg.offsetHeight;

                    util.css(_this.moveObj,{
                        marginLeft:-this.WIDTH/2+"px",
                        marginTop:-this.HEIGHT/2+"px"
                    });
                });
            },
            previewClose: function(){
                this.LEFT = this.elemPreviewContain.offsetWidth/2; // 璁板綍鍒氬紑濮嬬綉椤垫樉绀鸿窛绂诲乏杈圭殑浣嶇疆
                this.TOP = this.elemPreviewContain.offsetHeight/2; // 璁板綍鍒氬紑濮嬬綉椤垫樉绀鸿窛绂讳笂杈圭殑浣嶇疆

                util.css(this.moveObj,{width:this._WIDTH+"px"});
                util.css(this.imgBg,{display:"none"});
            }
        };

        window.Preview = Preview;
    })();
</script>
@}